<div class="vendors view">
<h2><?php echo __('Vendor'); ?></h2>
	<dl>
		<dt><?php echo __('Vendor Id'); ?></dt>
		<dd>
			<?php echo h($vendor['Vendor']['vendor_id']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Vendor Name'); ?></dt>
		<dd>
			<?php echo h($vendor['Vendor']['vendor_name']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Vendor Phone'); ?></dt>
		<dd>
			<?php echo h($vendor['Vendor']['vendor_phone']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Vendor Description'); ?></dt>
		<dd>
			<?php echo h($vendor['Vendor']['vendor_description']); ?>
			&nbsp;
		</dd>
	</dl>
</div>
<div class="actions">
	<h3><?php echo __('Actions'); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__('Edit Vendor'), array('action' => 'edit', $vendor['Vendor']['vendor_id'])); ?> </li>
		<li><?php echo $this->Form->postLink(__('Delete Vendor'), array('action' => 'delete', $vendor['Vendor']['vendor_id']), array(), __('Are you sure you want to delete # %s?', $vendor['Vendor']['vendor_id'])); ?> </li>
		<li><?php echo $this->Html->link(__('List Vendors'), array('action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Vendor'), array('action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Purchases'), array('controller' => 'purchases', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Purchase'), array('controller' => 'purchases', 'action' => 'add')); ?> </li>
	</ul>
</div>
<div class="related">
	<h3><?php echo __('Related Purchases'); ?></h3>
	<?php if (!empty($vendor['Purchase'])): ?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php echo __('Purchase Id'); ?></th>
		<th><?php echo __('Purchase Code'); ?></th>
		<th><?php echo __('Vendor Id'); ?></th>
		<th><?php echo __('Employee Id'); ?></th>
		<th><?php echo __('Date Purchase'); ?></th>
		<th><?php echo __('Subtotal'); ?></th>
		<th><?php echo __('Discount For Buyer'); ?></th>
		<th><?php echo __('Total'); ?></th>
		<th><?php echo __('Dept'); ?></th>
		<th><?php echo __('Purchase Description'); ?></th>
		<th class="actions"><?php echo __('Actions'); ?></th>
	</tr>
	<?php foreach ($vendor['Purchase'] as $purchase): ?>
		<tr>
			<td><?php echo $purchase['purchase_id']; ?></td>
			<td><?php echo $purchase['purchase_code']; ?></td>
			<td><?php echo $purchase['vendor_id']; ?></td>
			<td><?php echo $purchase['employee_id']; ?></td>
			<td><?php echo $purchase['date_purchase']; ?></td>
			<td><?php echo $purchase['subtotal']; ?></td>
			<td><?php echo $purchase['discount_for_buyer']; ?></td>
			<td><?php echo $purchase['total']; ?></td>
			<td><?php echo $purchase['dept']; ?></td>
			<td><?php echo $purchase['purchase_description']; ?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View'), array('controller' => 'purchases', 'action' => 'view', $purchase['purchase_id'])); ?>
				<?php echo $this->Html->link(__('Edit'), array('controller' => 'purchases', 'action' => 'edit', $purchase['purchase_id'])); ?>
				<?php echo $this->Form->postLink(__('Delete'), array('controller' => 'purchases', 'action' => 'delete', $purchase['purchase_id']), array(), __('Are you sure you want to delete # %s?', $purchase['purchase_id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('New Purchase'), array('controller' => 'purchases', 'action' => 'add')); ?> </li>
		</ul>
	</div>
</div>
